<%= form_for @project, :html => {:class => 'form-horizontal', :multipart => true, :data => {:abide => true}} do |f| %>
    <div class="form-content form-below">
      <% if @project.errors.any? %>
          <div id="error_explanation">
            <% @project.errors.full_messages.each do |msg| %>
                <li><%= msg %></li>
            <% end %>
            </ul>
          </div>
      <% end %>
      <%= build_validated_field('project', 'name', 'Title', 'Cannot be blank', '[a-zA-Z]+', 'text',@project.name) %>
      <%= build_validated_field('project', 'code', 'Code', 'Cannot be blank', '[a-zA-Z]+', 'text',@project.code) %>
      <%= build_field('project', 'website', 'Url', 'text',@project.website) %>
      <%= build_field('project', 'description', 'Description', 'text_area',@project.description) %>
      <%= build_field('project', 'image', 'Image', 'file',@project.image) %>
      <%#= build_validated_field('project', 'is_deleted', 'Deleted', 'Cannot be blank', '[a-zA-Z]+', 'checkbox',@project.is_deleted) %>
      <%#= build_field('project', 'team_count', 'Teams count', 'text',@project.team_count) %>
      <%#= build_field('project', 'member_count', 'Members count', 'text',@project.member_count) %>
      <div class='form-row'>
        <div class='small-3 columns'>
          <%= f.label :user_ids, 'Managers' %>
        </div>
        <div class='small-9 columns'>
          <%= f.select :user_ids,@users.map{|x| [x.name,x.id]},{},{:multiple=>true} %>
        </div>
      </div>
    </div>
    <div class="small-12 columns form-action-up">
    <div class="title">Department</div>
      <div class="right">
        <%= f.submit 'Save', :class => 'button alert right' %>
        <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
                    projects_path, :class => 'btn cancel-btn' %>
      </div>
    </div>
<% end %>
<script type="text/javascript">
    window.location = '#pane3'
</script>
